package escom.dds.gestionarexamen.bussines;

import java.util.List;

import javax.inject.Named;

import org.springframework.transaction.annotation.Transactional;

import escom.dds.gestionarexamen.dao.ExamenDao;
import escom.dds.modelo.Examen;

@Named("examenBs")
public class ExamenBs {

	private ExamenDao examenDao;
	
	@Transactional
	public Examen save (Examen examen){
		return examenDao.save(examen);
	}
	
	@Transactional
	public Examen update(Examen examen){
		return examenDao.update(examen);
	}
	
	@Transactional
	public Examen delete(Examen examen){
		return examenDao.delete(examen);
	}
	
	@Transactional
	public List<Examen> findAll() {
		return examenDao.findAll();
	}
	

	/**
	 * @return the examenDao
	 */
	public ExamenDao getExamenDao() {
		return examenDao;
	}

	/**
	 * @param examenDao
	 *            the examenDao to set
	 */
	public void setExamenDao(ExamenDao examenDao) {
		this.examenDao = examenDao;
	}

}
